package com.example.test.config;

import com.baidu.aip.face.AipFace;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class ApiFaceConfig {

    //设置APPID/AK/SK
    public static final String APP_ID = "17255172";
    public static final String API_KEY = "q5XlsyLqnKK5CQML0a4aRxWh";
    public static final String SECRET_KEY = "BZMa1GqkxxRHPnSAdGoCpKg1l2Qh1i26";

    @Bean
    public AipFace getAipFace() {
        AipFace client = new AipFace(APP_ID, API_KEY, SECRET_KEY);
        // 可选：设置网络连接参数
        client.setConnectionTimeoutInMillis(2000);
        client.setSocketTimeoutInMillis(60000);
        return client;
    }
}
